package com.greenline.search.report;

import java.util.Properties;

/**
 * Created with IntelliJ IDEA.
 * User: liulei
 * Date: 14-4-15
 * Time: 下午5:02
 * To change this template use File | Settings | File Templates.
 */
public class CrontabReport {
    public  static final String noResultReport = "noresult";
    public  static final String topQueryReport = "topquery";
    public  static final String noResultReportSpecifyTime = "timenoresult";
    public  static final String searchLogReport = "logreport";
    public static void main(String[] args) {

        String className = noResultReport;
        if(args.length > 0){
            className = args[0];
        }
        if(className.equals(noResultReport)){
            System.out.println("Execute the no result report.");
            TopNoResultsWordEmail.main(null);
        }else if(className.equals(searchLogReport)){
            System.out.println("Execute the search log report.");
            SearchLogReportEmail.main(null);
        }else if(className.equals(topQueryReport)){
            System.out.println("Execute the top query report.");
            GetTopQuery.main(null);
        }else if(className.equals(noResultReportSpecifyTime)){
            System.out.println("Execute the specify time no result report.");
            SpecifyTimeTopNoResultsWordEmail.main(new String[]{args[1]});
        }else {
            System.out.println("Execute nothing.");
        }
    }
}
